package com.wmlive.hhvideo.heihei.db.datatable;

import com.wmlive.hhvideo.common.base.BaseModel;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Unique;

/**
 * IM 消息中的用户消息表
 * Created by kangzhen on 2017/7/6.
 */

@Entity
public class IMMessageUserTable extends BaseModel {
    @Transient
    private static final long serialVersionUID = -8461312215554354320L;

    @Id(autoincrement = true)
    private Long listid;//列表id
    private String msg_type;//消息类型

    //来自用户
    private String from_user;


    //to_user
    private String to_user;


    private String content;
    // 消息id
    @Unique
    private String msg_id;
    private String create_time;
    private String tips;
    private Integer isRead = 0;
    private String  create_time_db;//入库时间
    @Generated(hash = 1166056241)
    public IMMessageUserTable() {
    }
    @Generated(hash = 548684332)
    public IMMessageUserTable(Long listid, String msg_type, String from_user, String to_user, String content, String msg_id, String create_time, String tips, Integer isRead, String create_time_db) {
        this.listid = listid;
        this.msg_type = msg_type;
        this.from_user = from_user;
        this.to_user = to_user;
        this.content = content;
        this.msg_id = msg_id;
        this.create_time = create_time;
        this.tips = tips;
        this.isRead = isRead;
        this.create_time_db = create_time_db;
    }
    public void setListid(Long listid) {
        this.listid = listid;
    }

    public void setMsg_type(String msg_type) {
        this.msg_type = msg_type;
    }

    public void setFrom_user(String from_user) {
        this.from_user = from_user;
    }

    public void setTo_user(String to_user) {
        this.to_user = to_user;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setMsg_id(String msg_id) {
        this.msg_id = msg_id;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public void setCreate_time_db(String create_time_db) {
        this.create_time_db = create_time_db;
    }


    public Long getListid() {
        return listid;
    }

    public String getMsg_type() {
        if("null".equals(msg_type) || "NULL".equals(msg_type)){
            return "";
        }
        return msg_type;
    }

    public String getFrom_user() {
        if(from_user ==null){
            return "";
        }
        return from_user;
    }

    public String getTo_user() {
        if(to_user==null){
            return "";
        }
        return to_user;
    }

    public String getContent() {
        if(content==null){
            return "";
        }
        return content;
    }

    public String getMsg_id() {
        if("null".equals(msg_id) || "NULL".equals(msg_id)){
            return "";
        }
        return msg_id;
    }

    public String getCreate_time() {
        if("null".equals(create_time) || "NULL".equals(create_time)){
            return "";
        }
        return create_time;
    }

    public String getTips() {
        if("null".equals(tips) || "NULL".equals(tips)){
            return "";
        }
        return tips;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public String getCreate_time_db() {
        if("null".equals(create_time_db) || "NULL".equals(create_time_db)){
            return "";
        }
        return create_time_db;
    }
}
